// Lang_07 [method parameters].nova


// The application class.
class MethodParametersApp
{
   // Application class's "main" function.
   public static void main( String[] args )
   {
      int i = 20;

      params( "First params function called." );
      params( i );
      params( 1, true );
      params( 1, true, "Fourth params function called." );
      params( 1, true, "Fifth params function called.", 2 );

      Stream.writeLine( Integer.toString( i ) );
   }


   // Test the parameters of a method.
   private static void params( String s )
   {
      Stream.writeLine( s );
   }


   // Test the parameters of a method.
   private static void params( int i )
   {
      Stream.write( Integer.toString( i ) );

      i = 5;

      Stream.writeLine( Integer.toString( i ) );
   }


   // Test the parameters of a method.
   private static void params( int i, bool b )
   {
      Stream.write( Integer.toString( i ) );
      Stream.writeLine( Boolean.toString( b ) );
   }


   // Test the parameters of a method.
   private static void params( int i, bool b, String s )
   {
      Stream.write( Integer.toString( i ) );
      Stream.write( Boolean.toString( b ) );
      Stream.writeLine( s );
   }


   // Test the parameters of a method.
   private static void params( int i, bool b, String s, int j )
   {
      Stream.write( Integer.toString( i ) );
      Stream.write( Boolean.toString( b ) );
      Stream.write( s );
      Stream.writeLine( Integer.toString( j ) );
   }
}